<template>
  <div class="not-found-container">
    <div class="not-found-content">
      <h1 class="title">404</h1>
      <p class="desc">抱歉，您访问的页面不存在</p>
      <a-button type="primary" @click="goHome">返回首页</a-button>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';

const router = useRouter();

function goHome() {
  router.push('/');
}
</script>

<style scoped>
.not-found-container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f2f5;
}

.not-found-content {
  text-align: center;
}

.title {
  font-size: 72px;
  font-weight: 600;
  color: #1890ff;
  margin: 0;
}

.desc {
  font-size: 20px;
  color: rgba(0, 0, 0, 0.45);
  margin: 16px 0 24px;
}
</style> 